<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <title>云平台管理系统-时空电动</title>
    <meta content="width=device-width, height=device-height, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <link rel="shortcut icon" href="/static/img/icon_btkj.png">

	<#include "bases/global_style.ftl">
	<#include "bases/global_js.ftl">

    <script src="<@spring.url '/static/media/js/app.js'></@spring.url>"></script>
    <script src="<@spring.url '/static/media/js/form-components.js'></@spring.url>"></script>
 
    <link rel="stylesheet" href="<@spring.url '/static/css/main.css'></@spring.url>">
    <link rel="stylesheet" href="<@spring.url '/static/css/main.min.css'></@spring.url>">


</head>
<body class="page-header-fixed">
<script>

        jQuery(document).ready(function()
        {
            App.init();
        });
        
        function validNull(var1, var2)
        {
        	if (var1 == null || var1 == "") 
            {
                document.getElementById(var2).style.borderColor = "#FF0000";
                return 0;
            } 
            else 
            {
                return 1;
            }
        }
        
        function updateTable() 
        {
            var readyFrequence=document.getElementById("readyFrequence").value;
            var rentFrequence=document.getElementById("rentFrequence").value;
            var heartBeatTimeOutMinutes=document.getElementById("heartBeatTimeOutMinutes").value;
            var updateCarInfoLogFrequence=document.getElementById("updateCarInfoLogFrequence").value;
            var sampleNumbersForLeftMiles=document.getElementById("sampleNumbersForLeftMiles").value;
            var count = 0;
			count = count + validNull(readyFrequence, "readyFrequence");
			count = count + validNull(rentFrequence, "rentFrequence");
			count = count + validNull(heartBeatTimeOutMinutes, "heartBeatTimeOutMinutes");
			count = count + validNull(updateCarInfoLogFrequence, "updateCarInfoLogFrequence");
			count = count + validNull(sampleNumbersForLeftMiles, "sampleNumbersForLeftMiles");
            
            $("#postaction2").val("update");
            $("#postarg2").val(0);

            if (count == 5) 
            { 
            	$("#editForm").submit(); 
            }
        }
        function updateTable2() 
        {
            var latestAndroidVersion=document.getElementById("latestAndroidVersion").value;
            var latestAndroidVersionName=document.getElementById("latestAndroidVersionName").value;
            var latestAndroidVersionUrl=document.getElementById("latestAndroidVersionURL").value;
            var latestIosversionUrl=document.getElementById("latestIOSVersionURL").value;
            var latestWeixinAndroidVersionUrl=document.getElementById("latestWeixinAndroidVersionURL").value;
            var latestWeixinIosversionUrl=document.getElementById("latestWeixinIOSVersionURL").value;
            var guidUrl=document.getElementById("guidUrl").value;
            var count = 0;
			count = count + validNull(latestAndroidVersion, "latestAndroidVersion");
			count = count + validNull(latestAndroidVersionName, "latestAndroidVersionName");
			count = count + validNull(latestAndroidVersionUrl, "latestAndroidVersionUrl");
			count = count + validNull(latestIosversionUrl, "latestIosversionUrl");
			count = count + validNull(latestWeixinAndroidVersionUrl, "latestWeixinAndroidVersionUrl");
			count = count + validNull(latestWeixinIosversionUrl, "latestWeixinIosversionUrl");
			count = count + validNull(guidUrl, "guidUrl");
            
            $("#postaction3").val("update");
            $("#postarg3").val(0);

            if (count == 7) 
            { 
            	$("#editForm2").submit(); 
            }
        }
        function updateTable3() 
        {
            var deposit=document.getElementById("deposit").value;
            var rewards=document.getElementById("rewards").value;
            var levelupMile=document.getElementById("levelupMile").value;
            var pointCoefficientMiles=document.getElementById("pointCoefficientMiles").value;
            var pointsCoefficient=document.getElementById("points_coefficient").value;
            var count = 0;
			count = count + validNull(deposit, "deposit");
			count = count + validNull(rewards, "rewards");
			count = count + validNull(levelupMile, "levelupMile");
			count = count + validNull(pointCoefficientMiles, "pointCoefficientMiles");
			count = count + validNull(pointsCoefficient, "pointsCoefficient");
            
            $("#postaction4").val("update");
            $("#postarg4").val(0);

            if (count == 5) 
            { 
            	$("#editForm3").submit(); 
            }
        }
        function updateTable4() 
        {
            var validTime=document.getElementById("validTime").value;
            var validNotice=document.getElementById("validNotice").value;
            var smsContent1=document.getElementById("smsContent1").value;
            var smsContent2=document.getElementById("smsContent2").value;
            var count = 0;
			count = count + validNull(validTime, "validTime");
			count = count + validNull(validNotice, "validNotice");
			count = count + validNull(smsContent1, "smsContent1");
			count = count + validNull(smsContent2, "smsContent2");
            
            $("#postaction5").val("update");
            $("#postarg5").val(0);

            if (count == 4) 
            { 
            	$("#editForm4").submit(); 
            }
        }
        
</script>

<div class="page-container row-fluid">

	<#include "bases/navhead.ftl">
	<#include "bases/sidebar.ftl">

    <div class="page-content">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    <br/>
                    <ul class="breadcrumb">
                        <li>
                            <i class="icon-home"></i>
                            <a href="/index">首页</a>
                            <i class="icon-angle-right"></i>
                        </li>
                        <li>
                            <a href="#">系统管理</a>
                            <i class="icon-angle-right"></i>
                        </li>
                        <li><a href="#">通用信息</a></li>
                    </ul>
                </div>
            </div>

            
            <div class="row-fluid">
                <div class="span12">
                    <div class="portlet box green tabbable">
                        <div class="portlet-title">
                            <div class="caption"><i class="icon-cogs"></i>通用信息</div>
                        </div>

				            <div class="tabbable portlet-tabs portlet-body flip-scroll">
				            	<ul class="nav nav-tabs">
									<li><a href="#portlet_tab4" data-toggle="tab">验证码信息配置</a></li>
									<li><a href="#portlet_tab3" data-toggle="tab">运营参数配置</a></li>
									<li><a href="#portlet_tab2" data-toggle="tab">APP参数设置</a></li>
									<li class="active"><a href="#portlet_tab1" data-toggle="tab">车辆服务器参数</a></li>
								</ul>
								<div class="tab-content">
									<div class="tab-pane active" id="portlet_tab1">
										<form id="editForm" action="<@spring.url '/common_info'></@spring.url>" method="POST">
										    <table id="editTable" class="table-bordered table-striped table-condensed flip-content">
										        <input  type="hidden" id="postaction2" name="postaction" />
										        <input  type="hidden" id="postarg2" name="postarg" />
										        <tbody role="alert" aria-live="polite" aria-relevant="all">
										        <tr class="even">
										            <td style="text-align: right;">待机时心跳包频率</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="readyFrequence" name="readyFrequence" value="${CommonInfo.getReadyFrequence()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">租车时心跳包频率</td>
										            <td class="m-wrap span8">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="rentFrequence" name="rentFrequence"  value="${CommonInfo.getRentFrequence()}" />
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">心跳超时时间设置</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="heartBeatTimeOutMinutes" name="heartBeatTimeOutMinutes"  value="${CommonInfo.getHeartBeatTimeOutMinutes()}"/>
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">收集carInfoLog的频率</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="updateCarInfoLogFrequence" name="updateCarInfoLogFrequence"  value="${CommonInfo.getUpdateCarInfoLogFrequence()}"/>
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">预测续航里程所需采集的局部电压数量</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="sampleNumbersForLeftMiles" name="sampleNumbersForLeftMiles"  value="${CommonInfo.getSampleNumbersForLeftMiles()}"/>
										            </td>
										        </tr>
										        </tbody>
										    </table>
										    </br>
										    <div class="controls controls-row" style="text-align: center;">
										        <input type="button" value="提交" class="btn green" onclick="updateTable()"/>
										        <input type="submit" value="取消" class="btn green" formaction="<@spring.url '/common_info'></@spring.url>" />
										    </div>
										</form>
									</div>
									<div class="tab-pane " id="portlet_tab2">
										<form id="editForm2" action="<@spring.url '/common_info'></@spring.url>" method="POST">
										    <table id="editTable" class="table-bordered table-striped table-condensed flip-content">
										        <input  type="hidden" id="postaction3" name="postaction" />
										        <input  type="hidden" id="postarg3" name="postarg" />
										        <tbody role="alert" aria-live="polite" aria-relevant="all">
										        <tr class="even">
										            <td style="text-align: right;">Android最新版本号</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="latestAndroidVersion" name="latestAndroidVersion"  value="${CommonInfo.getLatestAndroidVersion()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">Android最新版本名</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="latestAndroidVersionName" name="latestAndroidVersionName"  value="${CommonInfo.getLatestAndroidVersionName()}"/>
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">Android最新版下载地址</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="latestAndroidVersionURL" name="latestAndroidVersionUrl"  value="${CommonInfo.getLatestAndroidVersionUrl()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">IOS最新版本下载地址</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="latestIOSVersionURL" name="latestIosversionUrl"  value="${CommonInfo.getLatestIosversionUrl()}"/>
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">微信Android最新版下载地址</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="latestWeixinAndroidVersionURL" name="latestWeixinAndroidVersionUrl"  value="${CommonInfo.getLatestWeixinAndroidVersionUrl()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">微信ios最新版本下载地址</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="latestWeixinIOSVersionURL" name="latestWeixinIosversionUrl"  value="${CommonInfo.getLatestWeixinIosversionUrl()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">租车策略webview引导界面</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="guidUrl" name="guidUrl"  value="${CommonInfo.getGuidUrl()}"/>
										            </td>
										        </tr>
										        </tbody>
										    </table>
										    </br>
										    <div class="controls controls-row" style="text-align: center;">
										        <input type="button" value="提交" class="btn green" onclick="updateTable2()"/>
										        <input type="submit" value="取消" class="btn green" formaction="<@spring.url '/common_info'></@spring.url>" />
										    </div>
										</form>
									</div>
									<div class="tab-pane " id="portlet_tab3">
										<form id="editForm3" action="<@spring.url '/common_info'></@spring.url>" method="POST">
										    <table id="editTable" class="table-bordered table-striped table-condensed flip-content">
										        <input  type="hidden" id="postaction4" name="postaction" />
										        <input  type="hidden" id="postarg4" name="postarg" />
										        <tbody role="alert" aria-live="polite" aria-relevant="all">
										        <tr class="even">
										            <td style="text-align: right;">押金</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="deposit" name="deposit"  value="${CommonInfo.getDeposit()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">奖励</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="rewards" name="rewards"  value="${CommonInfo.getRewards()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">等级上升所需开的里程数</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="levelupMile" name="levelupMile"  value="${CommonInfo.getLevelupMile()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">积分系数</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="pointCoefficientMiles" name="pointCoefficientMiles"  value="${CommonInfo.getPointCoefficientMiles()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">开车里程积分系数</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="points_coefficient" name="points_coefficient"  value="${CommonInfo.getPointsCoefficient()}"/>
										            </td>
										        </tr>
										        </tbody>
										    </table>
										    </br>
										    <div class="controls controls-row" style="text-align: center;">
										        <input type="button" value="提交" class="btn green" onclick="updateTable3()"/>
										        <input type="submit" value="取消" class="btn green" formaction="<@spring.url '/common_info'></@spring.url>" />
										    </div>
										</form>
									</div>
									<div class="tab-pane " id="portlet_tab4">
										<form id="editForm4" action="<@spring.url '/common_info'></@spring.url>" method="POST">
										    <table id="editTable" class="table-bordered table-striped table-condensed flip-content">
										        <input  type="hidden" id="postaction5" name="postaction" />
										        <input  type="hidden" id="postarg5" name="postarg" />
										        <tbody role="alert" aria-live="polite" aria-relevant="all">
										        <tr class="odd">
										            <td style="text-align: right;">验证码有效时间</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="validTime" name="validTime"  value="${CommonInfo.getValidTime()}"/>
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">短信通知内容</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="validNotice" name="validNotice"  value="${CommonInfo.getValidNotice()}"/>
										            </td>
										        </tr>
										        <tr class="odd">
										            <td style="text-align: right;">验证码前短信内容</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="smsContent1" name="smsContent1"  value="${CommonInfo.getSmsContent1()}"/>
										            </td>
										        </tr>
										        <tr class="even">
										            <td style="text-align: right;">验证码后短信内容</td>
										            <td class="center">
										                <input class="m-wrap span8" style="margin-top: 10px" type="text" id="smsContent2" name="smsContent2"  value="${CommonInfo.getSmsContent2()}"/>
										            </td>
										        </tr>
										        </tbody>
										    </table>
										    </br>
										    <div class="controls controls-row" style="text-align: center;">
										        <input type="button" value="提交" class="btn green" onclick="updateTable4()"/>
										        <input type="submit" value="取消" class="btn green" formaction="<@spring.url '/common_info'></@spring.url>" />
										    </div>
										</form>
									</div>
								</div>
				         	</div>
                    </div>
                </div>
            </div>
            
            
            
        </div>
    </div>
</div>
</div>
</body>
</html>
